from django.db import models
from apps.common.base.models import BaseModel
from apps.education.course.models import Course

class Section(BaseModel):

    course=models.ForeignKey(Course, related_name='course_section', verbose_name='课程', on_delete=models.SET_NULL, null=True, blank=True, db_constraint=False)
    parent = models.ForeignKey('self', related_name='parent_coursecate', verbose_name='上级分类', on_delete=models.SET_NULL, null=True, blank=True, db_constraint=False)

    name = models.CharField("名称", max_length=200, blank=True, null=True, default='')
    title = models.CharField("标题", max_length=200, blank=True, null=True, default='')

    

    class Meta:
        verbose_name = 'Section'
        verbose_name_plural = verbose_name
